package com.nine.common.pojo;


import java.io.Serializable;

import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
* 权限
* @TableName acl_permission
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "acl_permission111")
@ApiModel(value="Permission对象", description="权限")
public class Permission implements Serializable {

    /**
    * 编号
    */
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty("编号")
    private String id;
    /**
    * 所属上级
    */

    @ApiModelProperty("所属上级")
    private String pid;
    /**
    * 名称
    */

    @ApiModelProperty("名称")

    private String name;
    /**
    * 类型(1:菜单,2:按钮)
    */

    @ApiModelProperty("类型(1:菜单,2:按钮)")
    private Integer type;
    /**
    * 权限值
    */

    @ApiModelProperty("权限值")
    @TableField(value = "permission_value")
    private String permissionValue;
    /**
    * 访问路径
    */

    @ApiModelProperty("访问路径")

    private String path;
    /**
    * 组件路径
    */

    @ApiModelProperty("组件路径")

    private String component;
    /**
    * 图标
    */

    @ApiModelProperty("图标")

    private String icon;
    /**
    * 状态(0:禁止,1:正常)
    */
    @ApiModelProperty("状态(0:禁止,1:正常)")
    private Integer status;
    /**
    * 逻辑删除 1（true）已删除， 0（false）未删除
    */

    @ApiModelProperty("逻辑删除 1（true）已删除， 0（false）未删除")
    @TableField(value = "is_deleted")
    private Object isDeleted;
    /**
    * 创建时间
    */

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)

    private LocalDateTime gmtCreate;
    /**
    * 更新时间
    */

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)

    private LocalDateTime gmtModified;


    @TableField(exist=false)    //表示此属性不是数据库中的列。
    private List<Permission> children;
}
